import { get, post } from "../utils/request";

let baseUrl = process.env.VUE_APP_XS_API;
export const save = (data, type) => {
  if (type == 1) {
    data.merchantId = data.id;
    delete data.id;
    return post("/cloud-merchant/mrc/mrcinfo/change", {
      ...data
    });
  } else {
    data.storeId = data.id;
    delete data.id;
    return post("/cloud-merchant/mrc/store/change", {
      ...data
    });
  }
};

//获取行业列表
export const getIndustry = () => {
  return get(`${baseUrl}/business/sync/getIndustryList`);
};

export const setInPub = params => {
  return get(
    `/cloud-merchant/mrc/mrcinfo/pushPubSphereMerchant`,
    params
  );
};
// 查询是否报名活动
export const qryBankActByStoreNoSuc = params => {
  return get(
    `/cloud-merchant/bankAct/qryBankActByStoreNoSuc`,
    params
  );
};
